\chapter{Exemplo de código do módulo de Internacionalização}\label{codigos}

\lstset{language=XML,breaklines=true,caption=XML Schema com definições da gramática dos arquivos com sentenças,label=schema_sentencas}
\begin{lstlisting}
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:xml="http://www.w3.org/XML/1998/namespace">
<xs:import namespace="http://www.w3.org/XML/1998/namespace"
  schemaLocation="namespace.xsd"/>

<xs:element name="strings">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="sentenca" maxOccurs="unbounded">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="traducao" maxOccurs="unbounded">
              <xs:complexType>
                <xs:simpleContent>
                  <xs:extension base="xs:string">
                    <xs:attribute ref="xml:lang" use="required" />
                  </xs:extension>
                </xs:simpleContent>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
          <xs:attribute ref="xml:id" use="required" />
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>
</xs:schema>
\end{lstlisting}

\chapter{Exemplos de código do módulo de Metadados}
\lstset{language=XML,breaklines=true,caption=RDF de cabeçalho dos metadados de um exame,label=rdf_head}
\begin{lstlisting}
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Generated by RdfSerializer.php from RDF RAP.
# http://www.wiwiss.fu-berlin.de/suhl/bizer/rdfapi/index.html !-->

<rdf:RDF
  xml:base="./xml/dp6/dp6.head.rdf#"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
  xmlns:owl="http://www.w3.org/2002/07/owl#"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:dcterms="http://purl.org/dc/terms/"
  xmlns:vcard="http://www.w3.org/2001/vcard-rdf/3.0#">

<rdf:Description rdf:about="http://www.protem2.dc.uel.br/sacarweb-alt/xml/dp6/dp6.desc.xml">
  <dc:title>dp6</dc:title>
  <dc:publisher>Laboratorio PROTEM - DC - UEL</dc:publisher>
  <dcterms:created>2008-09-01</dcterms:created>
  <dc:format>text/xml</dc:format>
  <dc:language>en</dc:language>
  <dcterms:BibliographicResource><![CDATA[]]></dcterms:BibliographicResource>
  <dc:description>6 minutes walking test is used to measure exercise capacity.</dc:description>
  <dc:creator>O Especialista</dc:creator>
  <dcterms:modified>2008-09-01</dcterms:modified>
  <dcterms:bibliographicCitation>author1, author2</dcterms:bibliographicCitation>
</rdf:Description>

</rdf:RDF>
\end{lstlisting}

\lstset{language=XML,breaklines=true,caption=XML de corpo dos metadados de um exame,label=xml_body}
\begin{lstlisting}
<?xml version="1.0" encoding="UTF-8"?>
<exame>
  <nome>dp6</nome>
  <protocolo>It is asked for the patient to walk in an area of xxx meters during 6 minutes.</protocolo>
  <variavel>
    <nomeVariavel tipo="editavel">distance</nomeVariavel>
    <significado>the distance reached during the specified time</significado>
    <unidadeMedida> m</unidadeMedida>
    <dominio min="50" max="600"/>
    <preenchimento>
      <instrucaoPreenchimento> Fill the distance reached during the period</instrucaoPreenchimento>
    </preenchimento>
  </variavel>
  <variavel>
    <nomeVariavel tipo="editavel">heart rate</nomeVariavel>
    <significado>Cardiac frequency</significado>
    <unidadeMedida> bpm</unidadeMedida>
    <dominio min="40" max="200"/>
    <preenchimento>
      <instrucaoPreenchimento> Fill the field </instrucaoPreenchimento>
    </preenchimento>
  </variavel>
  <variavel>
    <nomeVariavel tipo="editavel">oxygen pulse saturation</nomeVariavel>
    <significado>What is oxygen pulse saturation?</significado>
    <unidadeMedida> unknow</unidadeMedida>
    <dominio min="20" max="200"/>
    <preenchimento>
      <instrucaoPreenchimento> fill blabla</instrucaoPreenchimento>
    </preenchimento>
  </variavel>
  <variavel>
    <nomeVariavel tipo="editavel">Borg Scale - Dyspnea</nomeVariavel>
    <significado>The Scale </significado>
    <unidadeMedida> absolute</unidadeMedida>
    <dominio min="1" max="5"/>
    <preenchimento>
      <instrucaoPreenchimento> the value reported by the patient</instrucaoPreenchimento>
    </preenchimento>
  </variavel>
  <variavel>
    <nomeVariavel tipo="editavel">Borg Scale - Exertion</nomeVariavel>
    <significado>The value reported by the patient</significado>
    <unidadeMedida> absolute1</unidadeMedida>
    <dominio min="1" max="5"/>
    <preenchimento>
      <instrucaoPreenchimento> the value reported by the patient</instrucaoPreenchimento>
    </preenchimento>
  </variavel>
  <variavel>
    <nomeVariavel tipo="calculada">Speed</nomeVariavel>
    <significado>The speed reached in each period </significado>
    <unidadeMedida> m/m</unidadeMedida>
    <preenchimento>
      <expressaoFormula>speed=distance/time</expressaoFormula>
    </preenchimento>
  </variavel>
</exame>
\end{lstlisting}

\chapter{Exemplo de código do módulo de Reporte de Erros}
\lstset{language=XML,breaklines=true,caption=XML com os dados de reporte de erro,label=ap:error}
\begin{lstlisting}
<?xml version="1.0" encoding="UTF-8"?>
<report xml:id="2008-10-12_12:38:31">
    <descricao></descricao>
    <objetivo></objetivo>
    <proposta></proposta>
    <gravidade></gravidade>
    <prioridade></prioridade>
    <log>
        <user>
            <login></login>
            <instituicao></instituicao>
            <idioma></idioma>
            <agent></agent>
        </user>
        <historico>
            <url timestamp=""></url>
        </historico>
        <traceback></traceback>
        <mensagem></mensagem>
        <cabecalho></cabecalho>
    </log>
    <implementacao>
        <resposavel></responsavel>
        <aceita date="" />
        <previsao date="" />
        <finalizada date="" />
    </implementacao>
</report>
\end{lstlisting}